package com.gouda.temporary.dao;

import java.util.List;
import com.gouda.temporary.vo.TempHourOrders;
import org.apache.ibatis.annotations.Param;

/**
 * TODO
 * @author 
 */
@Mapper
public interface TempHourOrdersMapper{   
    /**
     * 根据主键查询
     */
    public TempHourOrders getTempHourOrdersById(@Param("id")Integer id); 

    public TempHourOrders getTempHourOrdersByOrderNo(@Param("order_no")String order_no);

    public int updateOrderStatus(TempHourOrders tempHourOrders);

    /**
     * 查询出所有记录
     */
    public List<TempHourOrders> findAllTempHourOrders();    
    
    /**
     * 保存
     */
    public int saveTempHourOrders(TempHourOrders tempHourOrders);
    
    /**
     * 根据主键更新（参数对象中的主键将作为更新条件）
     */
    public int updateTempHourOrders(TempHourOrders tempHourOrders);
    
    /**
     * 根据主键删除
     */
    public int deleteTempHourOrders(@Param("id")Integer id);

    /**
     * 得到业主下单
     * @param ownerId
     * @return
     */
    public List<TempHourOrders> getTempHourOrdersByOwnerId(String ownerId);

    /**
     * 得到小时工所有的订单
     * @param workerId
     * @return
     */
    public List<TempHourOrders> getTempHourOrdersByWorkerId(String workerId);

    /**
     * 返回一个最新发布还没有被认领的任务单
     * @return
     */
    public TempHourOrders getNewsTempHourOrder();
}

